/* *****************************************
  1) Nueva columnas
   - comm.idpadtra, comm.codcot

   Ale - 08/01/2020                                                     
 ******************************************/


-- Tabla comm
ALTER TABLE comm ADD COLUMN idpadtra integer,
                 ADD COLUMN codcot varchar(30);

ALTER TABLE comm ADD CONSTRAINT gestion_ai_padtracomm FOREIGN KEY (idpadtra)
      REFERENCES public.pad (id) MATCH SIMPLE
      ON UPDATE NO ACTION ON DELETE RESTRICT;

COMMENT ON COLUMN comm.idpadtra IS 'IdPad de transportista';
COMMENT ON COLUMN comm.codcot IS 'Codigo de operacion de traslado (arba)';



-- =================================

SELECT aaversion('424.00','423.01');

-- =================================